package com.wms.common.exception;

import java.util.List;

public class BaseException extends Exception{
	private static final long serialVersionUID = 1L;
	/** error code is same with message */
	private String errorCode = null;

	/** Arguments of message */
	private List args = null;
	
	/**
	 * Default constructor
	 */
	public BaseException(){
		super();
	}
	
	/**
	 * Constructor
	 * @param errorCode
	 */
	public BaseException(String errorCode){
		super(errorCode);
		this.errorCode = errorCode;
	}
	
	/**
	 * Constructor
	 * @param errorCode
	 * @param args
	 */
	public BaseException(String errorCode , List args){
		super(errorCode);
		this.errorCode = errorCode;
		this.args = args;
	}

	/**
	 * Constructor
	 * @param cause
	 */
	public BaseException(Throwable cause){
		super(cause);	
	}
	
	/**
	 * Constructor
	 * @param errorCode
	 * @param cause
	 */
	public BaseException(String errorCode, Throwable cause){
		super(errorCode , cause);
		this.errorCode = errorCode;
	}
	
	/**
	 * Constructor
	 * @param errorCode
	 * @param args
	 * @param cause
	 */
	public BaseException(String errorCode, List args , Throwable cause){
		super(errorCode , cause);
		this.errorCode = errorCode;
		this.args = args;
	}	
	
	public List getArgs() {
		return args;
	}

	public void setArgs(List args) {
		this.args = args;
	}

	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}
}
